
echo "Start to generate python code from thrift interface define."

CURRENT_DIR=$(cd $(dirname $0); pwd)
echo "$CURRENT_DIR""/interface/"
FILE_LIST=$(ls ../interface/*)
echo "$FILE_LIST"
for file_name in $FILE_LIST
do
  if [[ $file_name == *".thrift" ]];
  then
    chmod 755 $file_name
    ../thrift.exe --gen py -out ../ $file_name
    echo ../thrift.exe --gen py -out ../ $file_name
  fi
done
echo "Finish generate code"
sleep 20
